From: Marco Trevisan (TreviƱo) Date: Tue, 10 Sep 2019 06:49:50 +0000 (+0200) Subject: selectArea: Ignore motion events once we got a result X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~811^2^2~135 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1d174044713a79f16c9351e73a9931474b23a5cb;p=gnome-shell.git selectArea: Ignore motion events once we got a result When selecting an area for screenshot we monitor the events while we've valid coordinates in order to redraw the rubber band. However, we don't stop ignore the motion events after button release and so while animating. This might cause an unwanted effect if moving the mouse away during fade out that is way more visible slowing-down the animations. To fix this ignore any motion event once we've set the results. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/711 --- diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js index 377879bfb..c9ede2fc1 100644 --- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -271,7 +271,7 @@ var SelectArea = class { } _onMotionEvent(actor, event) { - if (this._startX == -1 || this._startY == -1) + if (this._startX == -1 || this._startY == -1 || this._result) return Clutter.EVENT_PROPAGATE; [this._lastX, this._lastY] = event.get_coords();